﻿<Page
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
	  x:Class="MovieRental_Presentation.ReturnDialog" 
      d:DesignWidth="900" d:DesignHeight="500"
      mc:Ignorable="d"
      WindowTitle="Movie Rental"
	  MinWidth="900"
	  MinHeight="500" 
      ShowsNavigationUI="False">

	<Grid x:Name="LayoutRoot" Background="{StaticResource backgroundBrush}">
		<Border BorderBrush="{StaticResource borderBrush}" BorderThickness="{StaticResource borderThickness}" Margin="8" Padding="{StaticResource borderPadding}" CornerRadius="{StaticResource borderCornerRadius}">
			<Grid Margin="0">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" MinHeight="108.57"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<TextBlock Margin="8,8,0,0" TextWrapping="Wrap" Text="Repayment" FontSize="{StaticResource dialogGiantTitleTextSize}" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{StaticResource borderBrush}"/>
				<Button x:Name="backButton" Content="Back" HorizontalAlignment="Right" Width="60" VerticalAlignment="Center" Height="60" Margin="0,0,8,0" Click="backButton_Click"/>
				<Border BorderBrush="{StaticResource borderBrush}" BorderThickness="{StaticResource borderThickness}" Height="3" VerticalAlignment="Bottom"/>
				<Grid Margin="0" Grid.Row="1">
					<Grid.RowDefinitions>
						<RowDefinition Height="0.333*"/>
						<RowDefinition Height="0.333*"/>
						<RowDefinition Height="0.333*"/>
						<RowDefinition Height="Auto" MinHeight="88.358"/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="250"/>
						<ColumnDefinition Width="1*"/>
						<ColumnDefinition Width="2*"/>
					</Grid.ColumnDefinitions>
					<TextBlock Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Text="Customer"/>
					<TextBlock Margin="0" Text="Discount" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="1" VerticalAlignment="Center"/>
					<TextBlock Margin="0" Text="Total Price" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="2" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
					<Button Content="Ok" Margin="0,0,8,0" Grid.Row="4" VerticalAlignment="Center" Height="40" HorizontalAlignment="Center" Width="387.712" Grid.ColumnSpan="3" Name="okButton" Click="okButton_Click" />
					<TextBlock  Text="{Binding CustomerName}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Column="1"/>
					<DataGrid Margin="8" Grid.Column="2" Grid.RowSpan="3" ItemsSource="{Binding Loans}" AutoGenerateColumns="False">
						<DataGrid.Columns>
							<DataGridTextColumn Header="Movie" Binding="{Binding MovieTitle}" Width="*"/>
							<DataGridTextColumn Header="Publisher" Binding="{Binding Publisher}" Width="*"/>
							<DataGridTextColumn Header="Media Type" Binding="{Binding MediaTypeName}" Width="*"/>
							<DataGridTextColumn Header="Price Per Day" Binding="{Binding Path=Entity.PricePerDay, StringFormat=\{0:c\}}" Width="*"/>
						</DataGrid.Columns>
					</DataGrid>
					<TextBlock TextWrapping="Wrap" Text="{Binding Path=Discount, StringFormat=\{0\}%}" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="1" VerticalAlignment="Center" Grid.Column="1"/>
					<TextBlock TextWrapping="Wrap" Text="{Binding Path=TotalPrice, StringFormat=\{0:c\}}" HorizontalAlignment="Left" Foreground="{StaticResource inputBoxBrush}" FontSize="{StaticResource dialogElementFontSize}" Grid.Row="2" Grid.Column="1" Margin="0" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
				</Grid>
			</Grid>
		</Border>
	</Grid>
</Page>